package com.cis467.httpsender;
/*
 * @author: Zack Kendra
 * 
 */

public class HighScore{

 private String userName;
 private String levelName;
 private double levelTime;

 /*
  * With known variables this builds a valid instance of a High Score 
  *
  */
 public HighScore(String hs_levelName, String hs_userName, double hs_lvlTime){
   userName = hs_userName;
   levelName = hs_levelName;
   levelTime = hs_lvlTime;
 }

 /*
  *  For testing purposes mostly (this allows for building a High Score object to set values later)
  */
 public HighScore(){
  userName = "Jim";
  levelName = "Halpert";
  levelTime = 4.23;
 }

 /*
  * Parses a High Score string from the server into a valid High Score Object.
  */
 public HighScore(String fromServer){
	new HighScore();
 }

 
 /*
  * returns the User's name of whom acomplished the score
  */
 public String getUserName(){
  return userName;
 }

 /*
  * returns the level name of which the score is associated
  */
 public String getLevelName(){
  return levelName;
 }

 
 /*
  * returns the time achieved in the level
  */
 public double getTime(){
  return levelTime;
 }

 
 public void setUserName(String param_userName){
  userName = param_userName;
 }

 public void setLevelName(String param_levelName){
  levelName = param_levelName;
 }

 public void setLevelTime(double param_levelTime){
  levelTime = param_levelTime;
 }
 
 /*
  * returns a deliminated String that represents the object
  */
 public String toString(){
	 return userName + ": "+ levelName + " - " + levelTime + " sec.";
 }

 /*
  * returns a formatted String that represents the object
  */
 public String print(){
	 return levelName + "|*|" + userName + "|*|" + levelTime;
    
 }

}


